home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / e_os208 / example2 / example2.asm next >
Assembly Source File  |  1996-06-09  |  3KB  |  84 lines

  1. ;╔══════════════════════════════════════════════════════════════════════════╗
  2. ;║                                                                          ║
  3. ;║ This example show how to use EOS and the Diamond player                  ║
  4. ;║                                                                          ║
  5. ;║ Tabs : 13 21 29 37                                                       ║
  6. ;║                                                                          ║
  7. ;╚══════════════════════════════════════════════════════════════════════════╝
  8.  
  9. Locals
  10. .386
  11. CODE32 SEGMENT PUBLIC PARA 'CODE' USE32
  12. ASSUME  CS:CODE32,DS:CODE32,ES:CODE32
  13.  
  14. INCLUDE ..\RESOURCE\EOS.INC
  15.  
  16. Module_Name db '..\data\test.mod',0
  17.  
  18. Msg_Module  db '    ■ Module Not Found...',13,10,36
  19. Msg_Playing db '    ■ Playing Module',13,10,36
  20. Msg_Paused  db '    ■ Paused',13,10,36
  21.  
  22.  
  23. Start32:
  24.             mov ah,Detect_Sound_Card
  25.             xor bx,bx               ; Find the Best One (Gravis ;))
  26.             mov cx,1                ; Display the results
  27.             Int_EOS                 ; You must use this function before using
  28.                                     ; the player
  29.  
  30.             mov ah,Load_Module
  31.             mov al,0                ; Normal Load
  32.             mov bx,44000            ; Set Replay Rate For SB
  33.             mov edx,O Module_Name
  34.             Int_EOS
  35.             jnc Load_Ok             ; Can Load ??
  36.  
  37.             mov ah,Exit_Error       ; No Exit with Exit_Error function
  38.             mov edx,O Msg_Module    ; en Display Message
  39.             Int_EOS
  40. Load_Ok:
  41.  
  42.             mov ah,Play_Module      ; Start playing module
  43.             Int_EOS
  44.  
  45.             mov ah,9                ; Display Message
  46.             mov edx,O Msg_Playing
  47.             int 21h
  48.  
  49.             xor ah,ah               ; Wait A key
  50.             DosInt 16h
  51.  
  52.             mov ah,Stop_Module      ; Stop  playing module
  53.             Int_EOS
  54.  
  55.             mov ah,9                ; Display Message
  56.             mov edx,O Msg_Paused
  57.             int 21h
  58.  
  59.             xor ah,ah               ; Wait A key
  60.             DosInt 16h
  61.  
  62.             mov ah,Play_Module      ; ReStart playing module
  63.             Int_EOS
  64.  
  65.             mov ah,9                ; Display Message
  66.             mov edx,O Msg_Playing
  67.             int 21h
  68.  
  69.             xor ah,ah               ; Wait A key
  70.             DosInt 16h
  71.  
  72.             mov ah,Stop_Module      ; Stop  playing module
  73.             Int_EOS
  74.  
  75.             mov ah,Clear_Module     ; Unload module From memory
  76.             Int_EOS
  77.  
  78.             mov ax,4c00h            ; Exit with error code 0
  79.             int 21h
  80.  
  81.  
  82.             CODE32 ENDS
  83.  
  84.             END